﻿<s:SurfaceWindow x:Class="RssReader.Surface.SurfaceWindow1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    Title="RssReader.Surface"
    >
  <s:SurfaceWindow.Resources>
    <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
  </s:SurfaceWindow.Resources>

    <Grid Margin="2"  Background="{StaticResource WindowBackground}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Grid.Row="0" >
            <ComboBox ItemsSource="{Binding Sources}" SelectedItem="{Binding Selected,Mode=TwoWay}" DisplayMemberPath="Name" Width="300" Margin="3"/>
            <Button Command="{Binding FetchCommand}" Content=" Read Blog " Margin="3"/>
        </StackPanel>
        
        <s:ScatterView ItemsSource="{Binding Items}" Grid.Row="1" >
            <s:ScatterView.ItemTemplate>
                <DataTemplate>
                    <s:LibraryStackItem>
                        <Border BorderBrush="LightGray" Margin="5" CornerRadius="4" BorderThickness="2">
                            <StackPanel>
                                <TextBlock Foreground="Black" TextWrapping="Wrap" FontSize="16" Margin="3" Text="{Binding Header}"/>
                                <StackPanel Orientation="Horizontal" Margin="3">
                                    <TextBlock Text="Published:"/>
                                    <TextBlock Text="{Binding Published}"/>
                                </StackPanel>
                            </StackPanel>
                        </Border>
                    </s:LibraryStackItem>
                </DataTemplate>
            </s:ScatterView.ItemTemplate>
        </s:ScatterView>





    </Grid>
</s:SurfaceWindow>
